home *** CD-ROM | disk | FTP | other *** search
/ POINT Software Programming / PPROG1.ISO / pascal / swag / tsr.swg / 0017_TSR template.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1993-11-02  |  794 b   |  46 lines

  1. {
  2. MARC BIR
  3.  
  4. >I'm looking For a template to build TSR Program.
  5. }
  6.  
  7. {$M 2048, 0, 5120}
  8. Uses
  9.   Dos;
  10.  
  11. Var
  12.   OldKbdIntVec : Procedure;
  13.  
  14. Procedure DoWhatever;
  15. begin
  16.  if Mem[$B800:0] <> 32 Then
  17.    FillChar(Mem[$B800:0], 80 * 2, 32)
  18.  else
  19.    FillChar(Mem[$B800:0], 80 * 2, 23);
  20. end;
  21.  
  22. {$F+}
  23. Procedure NewKbdIntVec; Interrupt;
  24. Var
  25.   Input : Byte;
  26. begin
  27.   Input := port[$60];
  28.   if Input = $3B then { F1 }
  29.     DoWhatever;
  30.   Inline ($9C);
  31.   OldKbdIntVec;
  32. end;
  33. {$F-}
  34.  
  35. begin
  36.   GetIntVec($9,@OldKbdIntVec);
  37.   SetIntVec($9,@NewKbdIntVec);
  38.   Keep(0);
  39. end.
  40.  
  41. {
  42. This works, but you will most likely want a better TSR initiater than
  43. KEEP, there are some PD/Shareware ones out.  if you still need code,
  44. NETMAIL me, the code I have For TSR's is a couple hundred lines...
  45. }
  46.